package com.xiaoq.matrix.activity.endpoint;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.xiaoq.RedisTemplate4JedisCluster;
import com.xiaoq.coms.GenericResponse;
import com.xiaoq.matrix.activity.entity.ActivityAttendentEntity;
import com.xiaoq.matrix.activity.entity.ActivityEntity;
import com.xiaoq.matrix.activity.vo.ActivityViewVo;
import com.xiaoq.vo.PagingVo;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

@RestController
@RequestMapping("/api/v1/test")
public class RedisTestEndpoint {
	
	@Autowired
    private RedisTemplate4JedisCluster redis;
	
	@ApiOperation(value = "测试redis", notes = "测试redis")
	@ApiResponses({ @ApiResponse(code = 200, response = GenericResponse.class, message = "测试redis") })
	@GetMapping(value = "/redis", produces = { MediaType.APPLICATION_JSON_UTF8_VALUE })
	public ResponseEntity<?> findActivityByOrgnizerId() {
		
		redis.set("a", "b", "c");
		System.out.println(redis.get("a", "b"));
		return GenericResponse.ok();
		

	}

}
